% function to generate motor babbling torques.
function tau = TORQFUN(T, Q, QD)

tau =[T.*sin(T) 0];

maxtau=[6.4 2.8];

tau=max(-maxtau,min( maxtau, tau));

return

if floor(2*T) < .5
    tau = [5 -5]; %
else
    tau = [0 0];
end